#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <math.h>

using namespace std;

int main() {

    int n;
    cin >> n;
    
    int x = (int)sqrt(n);
    int y = x + 1;

    if (abs(n - x * x) < abs(n - y * y))
        cout << x;
    else
        cout << y;

    return 0;
}